import { WeaponAddAttack } from './../../game/GameDefine';

import { GameMapItemType } from "../../game/GameDefine";
import GameMapItemWidget from "./GameMapItemWidget";

const {ccclass, property, menu} = cc._decorator;

@ccclass
@menu("Widget/Game/GameMapItemWeaponWidget")
export default class GameMapItemWeaponWidget extends GameMapItemWidget {
    @property(cc.Label)
    lb_attack: cc.Label = null;

    public initWithItem(itemType: GameMapItemType): void {
        super.initWithItem(itemType);

        this.updateProp();
    }

    private updateProp(){
        this.lb_attack.string = WeaponAddAttack[this._itemType];
    }
}